import time

import requests
import execjs

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
    "X-Requested-With": "XMLHttpRequest",
}
url = "https://aerfaying.com/WebApi/Users/Login"
js_compile = execjs.compile(open("阿尔法.js").read())
username = "小杜"
password = "wqwq"
param_dict = js_compile.call("get_param",
                       f'/WebApi/Users/Login?username={username}&password={password}DUE$DEHFYE(YRUEHD*&')
t = param_dict["t"]
s = param_dict["s"]
print(s)
data = {
    "username": username,
    "password": password,
    "t": t,
    "s": s
}
#
response = requests.post(url, headers=headers, data=data)

print(response.text)
print(response)
